var h1 = document.querySelector('.hour');
var m1 = document.querySelector(".m");
var s1 = document.querySelector(".s");

function countDown(h1, m1, s1) {
    var nowTime = +new Date();
    var inputTime = +new Date("2021-6-6 18:00:00");
    var times = (inputTime - nowTime) / 1000;
    // var d = parseInt(times / 60 / 60 / 24);
    // d = d < 10 ? "0" + d : d;
    // day.innerHTML = d;
    var h = parseInt(times / 60 / 60 % 24);
    h = h < 10 ? "0" + h : h;
    h1.innerHTML = h;
    var m = parseInt(times / 60 % 60);
    m = m < 10 ? "0" + m : m;
    m1.innerHTML = m;
    var s = parseInt(times % 60);
    s = s < 10 ? "0" + s : s;
    s1.innerHTML = s;
}
setInterval("countDown(h1,m1,s1)", 1000);
// 添加不同颜色的上边框
var lis = document.querySelectorAll(".sha .shaul li");
lis[0].style.borderTop = "1px solid red";
lis[1].style.borderTop = "1px solid rgb(187, 255, 0)";
lis[2].style.borderTop = "1px solid rgb(3, 128, 245)";
lis[4].style.borderTop = "1px solid rgb(148, 3, 245)";
lis[3].style.borderTop = "1px solid rgb(245, 3, 152)";